//容器全局样式
body,
html,
#app {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0;
  margin: 0;
  min-width: 1366px;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

a {
  &:hover {
    cursor: pointer;
  }
}

// 页面主题样式
.page {
  padding-left: 10px;
  // min-width: 100%;
  overflow-y: auto;
}

.el-dialog__header {
  text-align: center;
}

.el-message {
  min-width: 150px !important;
}

/* 设置tooltip的最大宽度 */
.el-tooltip__popper {
  max-width: 500px;
}

/*-----el-picker type="datetime" 去掉“此刻”按钮-----*/

.el-picker-panel.el-date-picker.has-time
  .el-picker-panel__footer
  .el-picker-panel__link-btn:first-child {
  display: none;
}

/*-----DataGrid-----*/

.data-grid {
  font-size: 12px;

  .data-grid-item__label {
    margin: 0 !important;
    min-height: 34px;
  }
}

.data-grid-title {
  line-height: 30px;
  font-size: 14px;
  color: #333;
  font-weight: 600;

  > span:first-of-type {
    color: #00bbca;
    margin: 0 5px;
  }
}

// form样式
.form-style() {
  .el-form {
    // 表单项高度设置
    .el-form-item {
      .el-form-item__label {
        font-size: 12px;
        padding-bottom: 0;
        .setHeight;
      }

      .el-form-item__content {
        .setHeight;
      }

      .el-input-number {
        .setHeight(-2);
      }
    }

    .el-radio-group {
      margin-top: 5px;

      .el-radio {
        min-width: 50px;
        margin-left: 10px;
      }
    }
  }

  .data-form {
    .el-form {
      .el-form-item ~ {
        margin: 5px 5px 10px 0;
      }
    }
  }
}

.date-style() {
  @date-width: 180px;

  .el-date-editor--daterange,
  .el-date-editor--datetimerange {
    .el-range-input {
      width: 80px;
      font-size: 13px;
    }

    .el-range-separator {
      padding: 0 1px;
    }

    .el-icon-date {
      display: none;
    }

    .el-input__icon {
      line-height: 20px;
    }

    height: 26px;
    width: @date-width;
  }

  .el-range-editor.el-input__inner {
    padding-left: 0;
  }

  .el-range-separator {
    line-height: initial;
  }

  .el-date-editor--datetimerange {
    width: 455px;

    .el-range-input {
      width: 200px;
    }

    .el-input__icon {
      padding-left: 10px;
    }
  }
}

//input样式
.input-style() {
  // 基础input样式
  .el-input {
    height: @default-height;
    font-size: 12px;

    .el-input__inner {
      height: @default-height;
      .setHeight;
    }

    .el-input__icon {
      .setHeight;
    }
  }

  // 级联选择器样式
  .el-cascader {
    .setHeight; // 默认宽度
    font-size: 12px;

    .el-cascader__label {
      .setHeight; // 默认宽度
    }

    .el-input__icon {
      .setHeight;
    }
  }

  // form下input样式
  .el-form .el-form-item {
    .el-input {
      // 表单内宽度
      width: 180px;
    }

    .all-width {
      .el-input {
        width: 100%;
      }
    }

    .el-textarea {
      font-size: 12px;
    }
    .el-pagination .el-select .el-input{
      width: 100px;
      margin: 0 5px;
    }
    .el-pagination .el-input{
      width: 46px;
      margin: 0 5px;
    }
  }
  .el-form .two-select{
    .el-input {
      // 表单内宽度
      width: 84px;
    }
  }
  .el-select.overduePeriod-box .el-input {
    width: 83px;
  }

  // .number-range{
  //   .el-input {
  //     .el-input__inner {
  //       padding-right: 1px;
  //       padding-left: 15px;
  //     }
  //   }
  // }
  // 日期控件input样式
  .date-style();
}

// table样式
.table-style() {
  .el-table {
    .el-table__header {
      thead th {
        .setHeight;
        color: #8c8c8c;
        font-size: 12px;
        padding: 0;
        background-color: #f5f5f5;
        text-align: center;

        &.is-leaf {
          border-right: solid 1px transparent !important;
        }

        .el-checkbox {
          width: 19px;
        }
      }

      .caret-wrapper {
        height: 23px;

        .sort-caret {
          &.ascending {
            top: 0px;
          }

          &.descending {
            bottom: 1px;
          }
        }
      }
    }

    .el-table__body {
      .el-table__row.current-row td {
        background-color: #b2e5ff;
      }

      td {
        .cell {
          line-height: 28px;
          padding: 0;
          .table-item-border{
            border-bottom:1px solid #EBEEF5;
            &:last-child{
              border-bottom:0;
            }
          }

          & > *:only-child {
            padding: 0 4px;
          }
          .el-button{
            padding:5px;
          }
        }

        &:not(.is-right):not(.is-left) {
          text-align: center;
        }

        padding: 0;
        font-size: 12px !important;

        .el-button.el-button--text {
          padding: 0 4px;
          font-size: 12px !important;
        }
      }
    }
  }
  .annex-info-data-box{
    .el-table__body{
      td{
        .el-button.btn {
          position: relative;
          top: -20px;
        }
      }
    }
  }
}

//input样式
.button-style() {
  .el-button {
    &.el-button--default {
      .setHeight;
      padding: 0 20px;
      min-width: 100px;
      font-size: 12px;
      font-weight: 400;
    }
    &.call-bar-trigger{
      background-color: #ffffff;
      color:#3582fb;
    }
    &.case-info-detail {
      padding: 0 6px;
      min-width: 80px;
      font-weight: 400;
      line-height: 22px;
    }
    &.search-button {
      padding: 0 10px;
      line-height: 23px;
    }
    &.edit-button {
      padding: 0 10px;
      line-height: 23px;
      min-width: 48px;
      margin-left: 5px;
    }

    &.el-button--primary {
      .setHeight;
      padding: 0 20px;
      min-width: 100px;
      font-size: 12px;
      font-weight: 400;
    }

    &.el-button--text {
      font-size: 12px;
      font-weight: 400;
    }
  }
}

.radio-style() {
  .el-radio-group {
    .setHeight;

    .el-radio__label {
      font-size: 12px;
    }
  }
}

.select-style() {
  // .el-select {
  //   max-width: 180px;
  // }
  .select-style-multiple-filterable{
    width:100%;
    .el-select__tags {
      flex-wrap: nowrap;
      overflow: hidden;
      // top:35%;
    }
    .el-input{
      width:100%!important;
      .el-input__inner{
        height:auto;
      }
    }
  }
}

// el-step样式调整
.case-flow-follow {
  .el-steps {
    .el-step {
      height: 85px;
      text-align: left;
    }

    .el-step__main {
      white-space: nowrap;
    }
  }
}

.fixed-style() {
  // 全局弹出框样式修正
  .el-dialog {
    .el-dialog__body {
      max-height: 600px;
      overflow: auto;
    }

    &.is-fullscreen .el-dialog__body {
      max-height: unset;
      overflow: unset;
    }
  }

  // 修正表格样式
  // .el-table__header-wrapper,
  // .el-table__body-wrapper {
  //   padding-right: 1px;
  // }
}

.card-style() {
  .el-card {
    .el-card__header {
      padding: 10px !important;
    }

    .el-card__body {
      padding: 10px !important;
    }
  }
}

@default-height: 26px;

.setHeight {
  // height: @default-height;
  line-height: @default-height;
}

.setHeight(@additional) {
  // height: @default-height + @additional;
  line-height: @default-height + @additional;
}

#app,
.el-dialog {
  .page,
  .component {
    .form-style();
    .input-style();
    .button-style();
    .table-style();
    .select-style();
    .radio-style();
    .card-style();
    .fixed-style();
  }
}

// 地图窗体样式
.amap-info-content .prompt {
  line-height: 30px;
  text-align: left;
  height: auto;
  width: 300px;
}

.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
  background-color: #b2e5ff !important;
}

.el-notification.remind_notify {
  .el-notification__icon {
    animation: notify_show 0.5s linear infinite;
    color: #f56c6c;
  }

  @keyframes notify_show {
    0% {
      transform: rotate(25deg);
    }

    25% {
      transform: rotate(0deg);
    }

    50% {
      transform: rotate(-25deg);
    }

    75% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(25deg);
    }
  }
}

.collection-hotkey {
  .el-button--text:focus,
  .el-button--text.list-button:hover {
    color: #66b1ff;
    border-color: #265bb0;
  }
  .list-button {
    border-color: #265bb0;
    background: #ffffff;
    color: #265bb0;
    margin: 5px;
    width: 105px;
  }
}

.el-alert.alert-style{
  .el-alert__title{
    font-size: 14px;
  }
}
